package org.alex.samples.model;

import java.io.Serializable;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table( name = "exam_user_role" )
public class ExamUserRole implements Serializable {
	
	private static final long serialVersionUID = 4240646979055538811L;

	@Id
	@ManyToOne( cascade = {CascadeType.DETACH,CascadeType.PERSIST,CascadeType.MERGE} )
	@JoinColumn( name = "role_id" )
	private ExamRole examRole;

	@Id
	@ManyToOne( cascade = {CascadeType.DETACH,CascadeType.PERSIST,CascadeType.MERGE} )
	@JoinColumn( name = "user_id" )
	private Users users;

	public ExamUserRole(){
		super();
	}

	public ExamUserRole(ExamRole examRole, Users users) {
		super();
		this.examRole = examRole;
		this.users = users;
	}

	public ExamRole getExamRole() {
		return examRole;
	}

	public void setExamRole(ExamRole examRole) {
		this.examRole = examRole;
	}

	public Users getUsers() {
		return users;
	}

	public void setUsers(Users users) {
		this.users = users;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	


	
}
